using Unity.Burst;
using Unity.Entities;
using Unity.Mathematics;
using UnityEngine;
using Unity.Transforms;
using System.Transactions;


public class MoveSpeedAuthring : MonoBehaviour
{
    public float moveSpeed;
    public float rotationSpeed;

    public class Baker : Baker<MoveSpeedAuthring>
    {
        public override void Bake(MoveSpeedAuthring authoring)
        {
            Entity entity = GetEntity(TransformUsageFlags.None);
            AddComponent(entity, new UnitMover
            {
                moveSpeed = authoring.moveSpeed,
                rotationSpeed=authoring.rotationSpeed,
                targetPosition=float3.zero
            });
        }
    }
}
